Skip to content

Instantly share code, notes, and snippets.

@TameemS
TameemS / debloatMEmu.md
Last active May 14, 2024 08:17
Debloating & Optimizing MEmu

Inspired by this

More of my guides: Debloating LDPlayer - Debloating Nox (Updated)

Edit 22/8/2021: I have updated MEmu and it seems like it reinstalls the apps and re-enables the services. Repeat steps 5, 7, 8, and 9 if you update MEmu.

Debloating MEmu

In my experience, Nox can be quite slow and choppy, and looks like I'm not the only person with this problem. A lot of people say that MEmu performs better than Nox, and I could agree with that. I have no chopping issues with it so far. But like Nox, there are kinda shady stuff going on.

Rust Error Handling Cheatsheet - Result handling functions

Introduction to Rust error handling

Rust error handling is nice but obligatory. Which makes it sometimes plenty of code.

Functions return values of type Result that is "enumeration". In Rust enumeration means complex value that has alternatives and that alternative is shown with a tag.

Result is defined as Ok or Err. The definition is generic, and both alternatives have

@jan4984
jan4984 / pulseaudio-ffmpeg.md
Last active May 14, 2024 08:16
audio over tcp with pulseaudio and ffmpeg

linux(WSL)

  • 永久启用pulseaudio

/etc/pulse/client.conf

autospawn = yes
@rutcreate
rutcreate / README.md
Last active May 14, 2024 08:15
Install Oracle InstantClient and SQL*Plus from source on Ubuntu 20.04

Download InstantClient

mkdir -p /opt/oracle
cd /opt/oracle
wget https://download.oracle.com/otn_software/linux/instantclient/218000/instantclient-basic-linux.x64-21.8.0.0.0dbru.zip
unzip instantclient-basic-linux.x64-21.8.0.0.0dbru.zip

Download SQLPlus

@0x263b
0x263b / colors.md
Last active May 14, 2024 08:15
Random color from string in javascript

Random color from string in javascript

Consider a list of strings you need to permanently assign a random color.

First you should turn the string into a hash.

var string = "string"
var hash = 0
@thesamesam
thesamesam / xz-backdoor.md
Last active May 14, 2024 08:12
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@xiaolai
xiaolai / markdownhere.css
Created July 2, 2016 12:12
markdown-here-css
.markdown-here-wrapper {
font-size: 16px;
line-height: 1.8em;
letter-spacing: 0.1em;
}
pre, code {
font-size: 14px;
font-family: Roboto, 'Courier New', Consolas, Inconsolata, Courier, monospace;
@plienhar
plienhar / aqlm-granularity.csv
Last active May 14, 2024 08:11
AQLM granularity
Group size (g) Number of codebooks (M) Code bit size (B) Total Average bits per parameter
32 3 16 1.931
8 1 16 2.038
16 2 16 2.145
32 5 14 2.368
32 4 16 2.573
@lennybacon
lennybacon / New-AES256Key.ps1
Last active May 14, 2024 08:11
Generate a new AES 256 Key with PowerShell
$random = [System.Security.Cryptography.RandomNumberGenerator]::Create();
$buffer = New-Object byte[] 32;
$random.GetBytes($buffer);
[BitConverter]::ToString($buffer).Replace("-", [string]::Empty);
@corbindavenport
corbindavenport / setup.sh
Last active May 14, 2024 08:09
My personal setup script for KDE Neon
# This is designed for KDE Neon
# To run this:
# bash <(curl -s https://gist.githubusercontent.com/corbindavenport/9e164da69ab9de884dfbb6ef9c29a5aa/raw/setup.sh)
# Set device hostname and get sudo
sudo echo "Set the name for this device (no spaces!):"
read hostname
hostnamectl set-hostname $hostname
# Update packages